﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

using MathNet.Numerics.Random;

namespace NuMetaheuristics.Utility
{
    public class RandomNumberGenerator : Xorshift
    {
        private static Xorshift _seedRng;

        public RandomNumberGenerator() 
            : base(getSeed())
        {
        }

        public static int getSeed()
        {
            if (_seedRng == null)
            {
                _seedRng = new Xorshift();
            }

            return _seedRng.Next();
        }
    }
}
